package com.nut.spp.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonAlias;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.nut.spp.util.JacksonUtils;
import lombok.Data;


/**
 * 支付记录
 */
@Data
@TableName("biz_pay_record")
public class PayRecord {

    @JsonIgnore
    private Integer id;

    @JsonAlias("app_id")
    private String appId;

    private String orderId;

    @JsonAlias("order_no")
    private String ssn;

    @JsonAlias("out_trans_id")
    private String outTransId;

    @JsonAlias("id")
    private String payId;

    @JsonAlias("pay_amt")
    private String payAmt;

    @JsonAlias("pay_channel")
    private String payChannel;

    private String status;

    private String json;


    public static void main(String[] args) {

        String ddd = "{\"app_id\":\"app_4a6f810d-482b-498b-be39-27a0b4cda0a5\",\"created_time\":\"20230707165318\",\"description\":\"\",\"end_time\":\"20230707165342\",\"expend\":{\"buyer_logon_id\":\"tc1***@163.com\",\"cashPayAmt\":\"0.01\",\"sub_open_id\":\"2088002085368000\"},\"fee_amt\":\"0.00\",\"id\":\"002212023070716531710523313753240907776\",\"order_no\":\"9a9fdd9ce39f424e87df1fa8380b4167\",\"out_trans_id\":\"2023070722001468001451815551\",\"party_order_id\":\"02212307076079760804609\",\"pay_amt\":\"0.01\",\"pay_channel\":\"alipay_qr\",\"real_amt\":\"0.01\",\"share_eq\":\"Y\",\"status\":\"succeeded\",\"trans_response_add_info\":\"{\\\"fund_bill_list\\\":[{\\\"amount\\\":\\\"0.01\\\",\\\"fund_channel\\\":\\\"ALIPAYACCOUNT\\\"}]}\"}";

        PayRecord payRecord = JacksonUtils.toObj(ddd, PayRecord.class);

        System.out.println(payRecord.getAppId());



    }
}
